package com.zhku.meeting.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhku.meeting.entities.ApplicationRecord;
import com.zhku.meeting.entities.TempStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
@Mapper
public interface ApplicationRecordMapper extends BaseMapper<ApplicationRecord> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table application_record
     *
     * @mbg.generated Sat Jun 13 18:04:24 CST 2020
     */
    int deleteByPrimaryKey(Integer applicationId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table application_record
     *
     * @mbg.generated Sat Jun 13 18:04:24 CST 2020
     */
    int insert(ApplicationRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table application_record
     *
     * @mbg.generated Sat Jun 13 18:04:24 CST 2020
     */
    ApplicationRecord selectByPrimaryKey(Integer applicationId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table application_record
     *
     * @mbg.generated Sat Jun 13 18:04:24 CST 2020
     */
    List<ApplicationRecord> selectAll();

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table application_record
     *
     * @mbg.generated Sat Jun 13 18:04:24 CST 2020
     */
    int updateByPrimaryKey(ApplicationRecord record);

    List<ApplicationRecord> selectByCondition(ApplicationRecord record);

    List<TempStatus> selectOccupy(@Param("date") Date date);

    int deleteByDeptId(@Param("deptId") Integer id);
}